<kd-card role="table">
  <div title i18n>Git Repository Manage</div>
  <div content>
    <mat-table [dataSource]="dataSource" class="mat-elevation-z8">
      <!--- Note that these columns can be defined in any order.
        The actual rendered columns are set as a property on the row definition" -->
      <!-- Position Column -->
      <ng-container matColumnDef="id">
        <div>
          <mat-header-cell *matHeaderCellDef>ID</mat-header-cell>
          <mat-cell *matCellDef=" let element">
            <mat-checkbox (click)="testrowcleck(element)" [color]="checkcolor" style="margin-right: 10px;">
            </mat-checkbox>
            &nbsp;{{element.id}} </mat-cell>
        </div>
      </ng-container>

      <!-- Name Column -->
      <ng-container matColumnDef="name">
        <mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
        <mat-cell *matCellDef="let element">
       
            <a  mat-button color="primary" 
            [routerLink]="['/git/projdetail', element.id]" 
            queryParamsHandling="preserve">
              {{element.name}} 
            </a>
 
        </mat-cell>
      </ng-container>

      <!-- Weight Column -->
      <ng-container matColumnDef="url">
        <mat-header-cell *matHeaderCellDef> Url </mat-header-cell>
        <mat-cell *matCellDef="let element"><a [href]="element.url" target="_blank">{{element.url}}</a> </mat-cell>
      </ng-container>

      <!-- Weight Column -->
      <ng-container matColumnDef="path">
        <mat-header-cell *matHeaderCellDef> Path </mat-header-cell>
        <mat-cell *matCellDef="let element"> {{element.path}} </mat-cell>
      </ng-container>

      <!-- Symbol Column -->
      <ng-container matColumnDef="authid">
        <mat-header-cell *matHeaderCellDef> authid </mat-header-cell>
        <mat-cell *matCellDef="let element"> {{element.authid}} </mat-cell>
      </ng-container>
      <ng-container matColumnDef="status">
        <mat-header-cell *matHeaderCellDef> status </mat-header-cell>
        <mat-cell *matCellDef="let element"> {{element.status}} </mat-cell>
      </ng-container>

      <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
      <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
    </mat-table>
  </div>

</kd-card>

<mat-divider></mat-divider>
<section>
  <div class="example-button-row">
    <button mat-raised-button color="warn" (click)="DeleteCheck()">Delete</button>
  </div>
  <div> | </div>
  <div class="example-button-row">
    <button mat-raised-button color="warn" (click)="AddNewDialog()">Add New</button>
  </div>
</section>
<mat-divider></mat-divider>

<kd-card role="table">
  <div title i18n>Git Auth Manage</div>
  <div content>
    <mat-table [dataSource]="authSource" class="mat-elevation-z8">
      <!--- Note that these columns can be defined in any order.
        The actual rendered columns are set as a property on the row definition" -->

      <!-- Position Column -->

      <ng-container matColumnDef="id">
        <div>
          <mat-header-cell *matHeaderCellDef>ID</mat-header-cell>
          <mat-cell *matCellDef=" let element">
            <mat-checkbox (click)="authcheck(element)" [color]="checkcolor" style="margin-right: 10px;">
            </mat-checkbox>
            &nbsp;{{element.id}} </mat-cell>
        </div>
      </ng-container>


      <!-- Weight Column -->
      <ng-container matColumnDef="username">
        <mat-header-cell *matHeaderCellDef> UserName </mat-header-cell>
        <mat-cell *matCellDef="let element">

          {{element.username}}

        </mat-cell>
      </ng-container>

      <!-- Weight Column -->
      <ng-container matColumnDef="password">
        <mat-header-cell *matHeaderCellDef> Password </mat-header-cell>
        <mat-cell *matCellDef="let element"> ******** </mat-cell>
      </ng-container>


      <mat-header-row *matHeaderRowDef="AuthdisplayedColumns"></mat-header-row>
      <mat-row *matRowDef="let row; columns: AuthdisplayedColumns;"></mat-row>
    </mat-table>
  </div>

</kd-card>
<mat-divider></mat-divider>
<section>
  <div class="example-button-row">
    <button mat-raised-button color="warn" (click)="DeleteCheckAuth()">Delete</button>
  </div>
  <div> | </div>
  <div class="example-button-row">
    <button mat-raised-button color="warn" (click)="AuthDialog()">Add New</button>
  </div>
</section>